<html>
<head>
<script>
var total=0;

function sumar(valor) {
total += valor; 
document.formulario.total.value=total;
}

function restar(valor) {
total-=valor; 
document.formulario.total.value=total;
}
</script>
</head>
<body>
<form name=formulario>
<input name="checkbox" type="checkbox" onClick="if (this.checked) sumar(50); else restar(50)" value="checkbox">$1<br>
<input name="checkbox" type="checkbox" onClick="if (this.checked) sumar(2); else restar(2)" value="checkbox">$2<br>
<input type="text" name="total" value="0">
</form>
</body>
</html>